<template>
  <a-config-provider :locale="locale">
    <div id="app">
      <router-view />
    </div>
  </a-config-provider>
</template>

<script>
import zhCN from "ant-design-vue/lib/locale-provider/zh_CN";
import { mapState } from "vuex";
import { updateTheme, updateColorWeak } from '@/components/SettingDrawer/settingConfig'

export default {
  name: "App",
  computed: {
    ...mapState({
      primaryColor: (state) => state.setting.primaryColor,
      colorWeak: (state) => state.setting.colorWeak,
    }),
  },
  data() {
    return {
      locale: zhCN
    };
  },
  mounted () {
    updateTheme(this.primaryColor)
    updateColorWeak(this.colorWeak)
  },
};
</script>
<style scoped>
#app,
body,
html {
  height: 100%;
}
</style>
